3.945 \(\int \frac{1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^3} \, dx\)

Optimal. Leaf size=161 \[ -\frac{3 i}{16 a^2 f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac{i}{8 a^2 f \left (c^3+i c^3 \tan (e+f x)\right )}+\frac{5 x}{16 a^2 c^3}-\frac{3 i}{32 a^2 c f (c-i c \tan (e+f x))^2}+\frac{i}{32 a^2 c f (c+i c \tan (e+f x))^2}-\frac{i}{24 a^2 f (c-i c \tan (e+f x))^3} \]

[Out]

(5*x)/(16*a^2*c^3) - (I/24)/(a^2*f*(c - I*c*Tan[e + f*x])^3) - ((3*I)/32)/(a^2*c*f*(c - I*c*Tan[e + f*x])^2) +
 (I/32)/(a^2*c*f*(c + I*c*Tan[e + f*x])^2) - ((3*I)/16)/(a^2*f*(c^3 - I*c^3*Tan[e + f*x])) + (I/8)/(a^2*f*(c^3
 + I*c^3*Tan[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.176972, antiderivative size = 161, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.129, Rules used = {3522, 3487, 44, 206} \[ -\frac{3 i}{16 a^2 f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac{i}{8 a^2 f \left (c^3+i c^3 \tan (e+f x)\right )}+\frac{5 x}{16 a^2 c^3}-\frac{3 i}{32 a^2 c f (c-i c \tan (e+f x))^2}+\frac{i}{32 a^2 c f (c+i c \tan (e+f x))^2}-\frac{i}{24 a^2 f (c-i c \tan (e+f x))^3} \]

Antiderivative was successfully verified.

[In]

Int[1/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^3),x]

[Out]

(5*x)/(16*a^2*c^3) - (I/24)/(a^2*f*(c - I*c*Tan[e + f*x])^3) - ((3*I)/32)/(a^2*c*f*(c - I*c*Tan[e + f*x])^2) +
 (I/32)/(a^2*c*f*(c + I*c*Tan[e + f*x])^2) - ((3*I)/16)/(a^2*f*(c^3 - I*c^3*Tan[e + f*x])) + (I/8)/(a^2*f*(c^3
 + I*c^3*Tan[e + f*x]))

Rule 3522

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^3} \, dx &=\frac{\int \frac{\cos ^4(e+f x)}{c-i c \tan (e+f x)} \, dx}{a^2 c^2}\\ &=\frac{\left (i c^3\right ) \operatorname{Subst}\left (\int \frac{1}{(c-x)^3 (c+x)^4} \, dx,x,-i c \tan (e+f x)\right )}{a^2 f}\\ &=\frac{\left (i c^3\right ) \operatorname{Subst}\left (\int \left (\frac{1}{16 c^4 (c-x)^3}+\frac{1}{8 c^5 (c-x)^2}+\frac{1}{8 c^3 (c+x)^4}+\frac{3}{16 c^4 (c+x)^3}+\frac{3}{16 c^5 (c+x)^2}+\frac{5}{16 c^5 \left (c^2-x^2\right )}\right ) \, dx,x,-i c \tan (e+f x)\right )}{a^2 f}\\ &=-\frac{i}{24 a^2 f (c-i c \tan (e+f x))^3}-\frac{3 i}{32 a^2 c f (c-i c \tan (e+f x))^2}+\frac{i}{32 a^2 c f (c+i c \tan (e+f x))^2}-\frac{3 i}{16 a^2 f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac{i}{8 a^2 f \left (c^3+i c^3 \tan (e+f x)\right )}+\frac{(5 i) \operatorname{Subst}\left (\int \frac{1}{c^2-x^2} \, dx,x,-i c \tan (e+f x)\right )}{16 a^2 c^2 f}\\ &=\frac{5 x}{16 a^2 c^3}-\frac{i}{24 a^2 f (c-i c \tan (e+f x))^3}-\frac{3 i}{32 a^2 c f (c-i c \tan (e+f x))^2}+\frac{i}{32 a^2 c f (c+i c \tan (e+f x))^2}-\frac{3 i}{16 a^2 f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac{i}{8 a^2 f \left (c^3+i c^3 \tan (e+f x)\right )}\\ \end{align*}

Mathematica [A]  time = 1.08595, size = 111, normalized size = 0.69 \[ \frac{(\cos (e+f x)+i \sin (e+f x)) (-120 i f x \sin (e+f x)+60 \sin (e+f x)+45 \sin (3 (e+f x))+5 \sin (5 (e+f x))+60 (2 f x-i) \cos (e+f x)+15 i \cos (3 (e+f x))+i \cos (5 (e+f x)))}{384 a^2 c^3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^3),x]

[Out]

((Cos[e + f*x] + I*Sin[e + f*x])*(60*(-I + 2*f*x)*Cos[e + f*x] + (15*I)*Cos[3*(e + f*x)] + I*Cos[5*(e + f*x)]
+ 60*Sin[e + f*x] - (120*I)*f*x*Sin[e + f*x] + 45*Sin[3*(e + f*x)] + 5*Sin[5*(e + f*x)]))/(384*a^2*c^3*f)

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 158, normalized size = 1. \begin{align*}{\frac{-{\frac{5\,i}{32}}\ln \left ( \tan \left ( fx+e \right ) -i \right ) }{f{a}^{2}{c}^{3}}}-{\frac{{\frac{i}{32}}}{f{a}^{2}{c}^{3} \left ( \tan \left ( fx+e \right ) -i \right ) ^{2}}}+{\frac{1}{8\,f{a}^{2}{c}^{3} \left ( \tan \left ( fx+e \right ) -i \right ) }}+{\frac{{\frac{3\,i}{32}}}{f{a}^{2}{c}^{3} \left ( \tan \left ( fx+e \right ) +i \right ) ^{2}}}+{\frac{{\frac{5\,i}{32}}\ln \left ( \tan \left ( fx+e \right ) +i \right ) }{f{a}^{2}{c}^{3}}}-{\frac{1}{24\,f{a}^{2}{c}^{3} \left ( \tan \left ( fx+e \right ) +i \right ) ^{3}}}+{\frac{3}{16\,f{a}^{2}{c}^{3} \left ( \tan \left ( fx+e \right ) +i \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^3,x)

[Out]

-5/32*I/f/a^2/c^3*ln(tan(f*x+e)-I)-1/32*I/f/a^2/c^3/(tan(f*x+e)-I)^2+1/8/f/a^2/c^3/(tan(f*x+e)-I)+3/32*I/f/a^2
/c^3/(tan(f*x+e)+I)^2+5/32*I/f/a^2/c^3*ln(tan(f*x+e)+I)-1/24/f/a^2/c^3/(tan(f*x+e)+I)^3+3/16/f/a^2/c^3/(tan(f*
x+e)+I)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 1.30683, size = 250, normalized size = 1.55 \begin{align*} \frac{{\left (120 \, f x e^{\left (4 i \, f x + 4 i \, e\right )} - 2 i \, e^{\left (10 i \, f x + 10 i \, e\right )} - 15 i \, e^{\left (8 i \, f x + 8 i \, e\right )} - 60 i \, e^{\left (6 i \, f x + 6 i \, e\right )} + 30 i \, e^{\left (2 i \, f x + 2 i \, e\right )} + 3 i\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{384 \, a^{2} c^{3} f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/384*(120*f*x*e^(4*I*f*x + 4*I*e) - 2*I*e^(10*I*f*x + 10*I*e) - 15*I*e^(8*I*f*x + 8*I*e) - 60*I*e^(6*I*f*x +
6*I*e) + 30*I*e^(2*I*f*x + 2*I*e) + 3*I)*e^(-4*I*f*x - 4*I*e)/(a^2*c^3*f)

________________________________________________________________________________________

Sympy [A]  time = 1.33394, size = 260, normalized size = 1.61 \begin{align*} \begin{cases} \frac{\left (- 33554432 i a^{8} c^{12} f^{4} e^{12 i e} e^{6 i f x} - 251658240 i a^{8} c^{12} f^{4} e^{10 i e} e^{4 i f x} - 1006632960 i a^{8} c^{12} f^{4} e^{8 i e} e^{2 i f x} + 503316480 i a^{8} c^{12} f^{4} e^{4 i e} e^{- 2 i f x} + 50331648 i a^{8} c^{12} f^{4} e^{2 i e} e^{- 4 i f x}\right ) e^{- 6 i e}}{6442450944 a^{10} c^{15} f^{5}} & \text{for}\: 6442450944 a^{10} c^{15} f^{5} e^{6 i e} \neq 0 \\x \left (\frac{\left (e^{10 i e} + 5 e^{8 i e} + 10 e^{6 i e} + 10 e^{4 i e} + 5 e^{2 i e} + 1\right ) e^{- 4 i e}}{32 a^{2} c^{3}} - \frac{5}{16 a^{2} c^{3}}\right ) & \text{otherwise} \end{cases} + \frac{5 x}{16 a^{2} c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))**2/(c-I*c*tan(f*x+e))**3,x)

[Out]

Piecewise(((-33554432*I*a**8*c**12*f**4*exp(12*I*e)*exp(6*I*f*x) - 251658240*I*a**8*c**12*f**4*exp(10*I*e)*exp
(4*I*f*x) - 1006632960*I*a**8*c**12*f**4*exp(8*I*e)*exp(2*I*f*x) + 503316480*I*a**8*c**12*f**4*exp(4*I*e)*exp(
-2*I*f*x) + 50331648*I*a**8*c**12*f**4*exp(2*I*e)*exp(-4*I*f*x))*exp(-6*I*e)/(6442450944*a**10*c**15*f**5), Ne
(6442450944*a**10*c**15*f**5*exp(6*I*e), 0)), (x*((exp(10*I*e) + 5*exp(8*I*e) + 10*exp(6*I*e) + 10*exp(4*I*e)
+ 5*exp(2*I*e) + 1)*exp(-4*I*e)/(32*a**2*c**3) - 5/(16*a**2*c**3)), True)) + 5*x/(16*a**2*c**3)

________________________________________________________________________________________

Giac [A]  time = 1.37155, size = 185, normalized size = 1.15 \begin{align*} -\frac{-\frac{30 i \, \log \left (\tan \left (f x + e\right ) + i\right )}{a^{2} c^{3}} + \frac{30 i \, \log \left (\tan \left (f x + e\right ) - i\right )}{a^{2} c^{3}} + \frac{3 \,{\left (15 i \, \tan \left (f x + e\right )^{2} + 38 \, \tan \left (f x + e\right ) - 25 i\right )}}{a^{2} c^{3}{\left (i \, \tan \left (f x + e\right ) + 1\right )}^{2}} - \frac{-55 i \, \tan \left (f x + e\right )^{3} + 201 \, \tan \left (f x + e\right )^{2} + 255 i \, \tan \left (f x + e\right ) - 117}{a^{2} c^{3}{\left (\tan \left (f x + e\right ) + i\right )}^{3}}}{192 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^3,x, algorithm="giac")

[Out]

-1/192*(-30*I*log(tan(f*x + e) + I)/(a^2*c^3) + 30*I*log(tan(f*x + e) - I)/(a^2*c^3) + 3*(15*I*tan(f*x + e)^2
+ 38*tan(f*x + e) - 25*I)/(a^2*c^3*(I*tan(f*x + e) + 1)^2) - (-55*I*tan(f*x + e)^3 + 201*tan(f*x + e)^2 + 255*
I*tan(f*x + e) - 117)/(a^2*c^3*(tan(f*x + e) + I)^3))/f